<!DOCTYPE html>
<html>
<head>
    <title>Register</title>
    <style>
        /* 添加样式 */
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f0f0f0;
            margin: 0;
            background-image: url(../image/2.jpg);
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: 0px -50px;
        }

        #register-box {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            width: 300px;
            text-align: center;
            box-sizing: border-box; /* 确保padding不增加宽度 */
        }

        .input-box, .select-box {
            position: relative;
            margin-bottom: 20px;
            width: 100%;
            box-sizing: border-box; /* 确保padding不增加宽度 */
        }

        .input-box i, .select-box label {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            background-color: white;
            padding: 0 5px;
        }

        .input-box input, .select-box select {
            width: 100%;
            padding: 10px 10px 10px 40px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-sizing: border-box; /* 确保padding不增加宽度 */
        }

        .select-box select {
            padding-left: 100px; /* 为了给 label 留出空间 */
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns%3D%22http%3A//www.w3.org/2000/svg%22 viewBox%3D%220 0 4 5%22%3E%3Cpath fill%3D%22%23007BFF%22 d%3D%22M2 0L0 2h4z%22/%3E%3C/svg%3E') no-repeat right 10px center;
            background-size: 12px 12px;
        }

        .btn {
            background-color: #007BFF;
            color: white;
            border: none;
            padding: 10px;
            border-radius: 5px;
            cursor: pointer;
            width: 100%;
            box-sizing: border-box; /* 确保padding不增加宽度 */
        }

        .btn:hover {
            background-color: #0056b3;
        }

        h1 {
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
    <form action="/register" method="post">
        <div id="register-box">
            <h1>Register</h1>
            <div class="input-box">
                <i class="iconfont">&#xe609;</i>
                <input name="username" type="text" class="loginuser" value="" placeholder="UserName"/>
            </div>
            <div class="input-box">
                <i class="iconfont">&#xe605;</i>
                <input name="password" type="password" class="loginpwd" value="" placeholder="UserPassword"/>
            </div>
            <div class="select-box">
                <label for="usertype">User Type:</label>
                <select name="usertype" id="usertype">
                    <option value="student">Student</option>
                    <option value="teacher">Teacher</option>
                </select>
            </div>
            <button type="submit" class="btn btn-primary">注册</button>
        </div>
    </form>
</body>
</html>
